﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Slf.Samples.CustomFactorySettings
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.Out.WriteLine("You can configure factory settings in App.config for your custom factories.");
      Console.Out.WriteLine("If your factory implements the 'IConfigurableLoggerFactory' interface, these settings will be forwarded to the factory during initialization.\n\n");
      Console.Out.WriteLine("This sample shows how to configure colors for a ColoreConsoleLogger through App.config.\n\n\n");


      //configuration is in app.config, no need to set up SLF up in code

      //log via default logger
      ILogger logger = LoggerService.GetLogger();
      logger.Info("Logging to default logger (App.config was configured with green foreground)");

      logger = LoggerService.GetLogger("important");
      logger.Info("Logging to important logger (App.config was configured with red foreground / yellow background)");

      Console.ReadLine();
    }
  }
}